var express = require('express');
var router = express.Router();
const { addComment, getComment, } = require('../service/commentsService');

//新增评论
router.post('/addComment', async function (req, res) {
    console.log(req.body);
    const data = await addComment(req.body);
    res.send(data);

});

//获取评论
router.post('/getComment', async function (req, res) {
    const data = await getComment(req.body);
    res.send(data);

});


module.exports = router;

